﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Data;

namespace DuncanDAL
{
    public class PayNecessityDataService : IDAL<D_PayNecessityObject>
    {
        public const string SQL_SELECT_PayNecessity = "select * from D_PayNecessity";
        #region IDAL<D_PayNecessityObject> 成员

        public void Create(D_PayNecessityObject obj)
        {
            throw new NotImplementedException();
        }

        public void Delete(D_PayNecessityObject obj)
        {
            throw new NotImplementedException();
        }

        public void Update(D_PayNecessityObject obj)
        {
            throw new NotImplementedException();
        }

        public IList<D_PayNecessityObject> QueryAll()
        {
            IList<D_PayNecessityObject> list = new List<D_PayNecessityObject>();
            DataTable dtD_PayNecessity = new DataTable("D_PayNecessity");
            DBHelper.FillData(SQL_SELECT_PayNecessity, dtD_PayNecessity);
            foreach (DataRow item in dtD_PayNecessity.Rows)
            {
                D_PayNecessityObject o = new D_PayNecessityObject();
                o.Data2Object(item);
                list.Add(o);
            }
            return list;
        }

        public D_PayNecessityObject Get(object id)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
